package com.esunny.springboot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.esunny.springboot.pojo.dto.LoginUser;
import com.esunny.springboot.pojo.dto.Permissions;
import com.esunny.springboot.pojo.entity.User;

import java.util.Set;

/**
 * <p>
 * 表名全称:t_user  用户表。 服务类
 * </p>
 *
 * @author 罗滔
 * @since 2020-10-19
 */
public interface UserService extends IService<User> {


    LoginUser login(String username, String password);

    void logout(String username);

    void addUser(String userName, String password, Permissions permissions, Long parentId, long role) throws Exception;

    void deleteUser(String userName);

    void updatePassword(String userName, String password, String newPassword);

    void updateRole(String userName, String role);

    void updateChildPermissions(String userName, Permissions permissions);

    void getSuperAdminPermissions();

    Set<String> getUserPermissions(String userName);
}
